<template>
  <div class="home">
    <p>{{msg}}{{foo}}</p>
    <p v-for="l in list" :key="l">{{l.name}}</p>
    <HelloWorld />
    <router-view/>
  </div>
</template>

<script>
import HelloWorld from "../components/HelloWorld";
import Bus from '../bus'
export default {
  name: "home",
  inject:['foo'],
  data() {
    return {
      msg: "初始值",
      list:[{name:111}]
    };
  },
  components:{
    HelloWorld
  },
  mounted () {
    this.list[0].name = 222
  },
  methods:{
    test(){
      
      this.msg = '123'
    }
  }
};
</script>
